﻿using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace Sinacor.Deployment.Setup.Parameter
{
    [Serializable]
    [XmlType(TypeName = "Sinacor.Deployment.Setup.Parameter.DataBase")]
    public class DataBase
    {
        [XmlAttribute()]
        public bool InstallPrincipal { get; set; }
        public List<Company> Companies { get; set; }
        public List<Company> CompaniesNotAllowed { get; set; }
        public DataBaseConnection ConnectionInfo { get; set; }
        [XmlAttribute()]
        public bool IgnoreInvalidVersion { get; set; }
        [XmlAttribute()]
        public bool TestedConnection { get; set; }
        [XmlAttribute()]
        public bool GoNextNoTestingConnection { get; set; }
        [XmlAttribute()]
        public bool SinacorDataBaseExists { get; set; }
        [XmlAttribute()]
        public bool PermitedClearSinacorDataBase { get; set; }
        [XmlAttribute()]
        public bool PermitedCompatibleCompanies { get; set; }
        [XmlAttribute()]
        public string ConnectionTestingException { get; set; }
        
        public DataBase()
        {
            ConnectionInfo = new DataBaseConnection();
            InstallPrincipal = false;
            SinacorDataBaseExists = false;
            Companies = new List<Company>();
            CompaniesNotAllowed = new List<Company>();
            PermitedClearSinacorDataBase = false;
        }
    }
}
